package com.sc.test.utils;

import android.content.Context;
import android.widget.TextView;

import com.squareup.leakcanary.LeakCanary;

/**
 * Created by Shen Chao on 2018-01-10-010 下午 19:56.
 */

public class LeakCanaryHelper {
    private Context mCtx;
    private TextView mTextView;

    private static LeakCanaryHelper instance = null;

    public LeakCanaryHelper() {
    }

    public LeakCanaryHelper(Context context) {
        this.mCtx = context;
    }

    public static LeakCanaryHelper getInstance(Context context) {
        if (instance == null) {
            instance = new LeakCanaryHelper(context);
        }
        return instance;
    }

    public void setmTextView(TextView tv) {
        this.mTextView = tv;
        mTextView.setText(mCtx.getString(android.R.string.ok));
    }

    public void removeTextView() {
        mTextView = null;
    }
}
